<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>供需对接服务系统--首页列表</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/supplier/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--layui-dropdown-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/layui/dropdown_2.3.3/dropdown.css">
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <#--<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>-->
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/tabs.js"></script>

</head>
<style>
    .Right {
        width: 100%;
        overflow-y: scroll;
    }

    .release ul:nth-child(2) li label {
        width: 28%;
    }

    .release ul:first-child li label {
        width: 33%;
    }

    .release .address, .personnel .address {
        width: 65%;
    }

    .sdDetaBtn button {
        width: 110px;
        height: 44px;
        margin: 10px 0;
        border: 1px solid #5775EF;
    }

</style>

<body>
<!--头部-->
<header class="whitebg"></header>

<!--占位-->
<div class="Name mt50 bold ft20 clearfix">
    <span class="fl">${project.projectName}项目</span>
    <div class="fr">
        <#if "${gxtype}"=="x" >
            <#if ("${project.status}"=="001" || "${project.status}"=="003"|| "${project.status}"=="005")   && "${checkedit}"==""  &&  "${myself}"=="1"      >
                <button type="button" class="redbg white bor0
				<#if "${project.checkStatus}"=="1">
				layui-btn-disabled
					</#if>
                "   <#if "${project.checkStatus}"!="1">
                        onclick="_crt_page.events.proDelete()">
                    </#if>
                    <img src="${re.contextPath}/plugin/common/images/72@2x.png" alt=""/>
                    <span style="font: 400 13.3333px Arial;}">删除</span>
                </button>
            </#if>
            <#if ("${project.status}"=="001" || "${project.status}"=="003"|| "${project.status}"=="005" || "${project.status}"=="006")   && "${checkedit}"==""   &&  "${myself}"=="1"   &&  "${isedit}"!="0"     >
                <button type="button" class="greenbg white bor0
				<#if "${project.checkStatus}"=="1">
				layui-btn-disabled
					</#if>
					 "
                        <#if "${project.checkStatus}"!="1"  >
                        onclick="_crt_page.events.proEdit()">
                    </#if>
                    <img src="${re.contextPath}/plugin/common/images/71@2x.png" alt=""/>
                    <span style="font: 400 13.3333px Arial;}">编辑</span>
                </button>
            </#if>
        </#if>
    </div>
</div>
<!--容器-->
<div class="container clearfix">
    <!--左侧菜单栏-->
    <div class="LeftOne fl clearfix">
        <div class="sdDetaBtn whitebg center fr"
                <#if  "${project.status}"=="002"  &&   "${check}"=="">
                    style="display: none"
                </#if>
        >
            <input id="source" type="hidden" value="${source}">
            <input id="ischeck" type="hidden" value="${ischeck}">
            <input id="message" type="hidden" value="${message}">

            <#if "${project.status}"!="002">
                <div>
                    <button type="button" style="background-color: red;border: 1px solid blue;" class="whitebg blue"  onclick="_crt_page.events.viewChangeClick()">
                        变更公告
                    </button>
                </div>
                <div>
                    <button type="button" class="whitebg blue" onclick="_crt_page.events.publicity()">结果公示</button>
                </div>
                <#if "${checkedit}"==""  &&  "${gxtype}"=="x"   &&  "${myself}"=="1" &&  "${project.status}"=="006"  && "${acceptview}"!="1"  &&  "${zbshr}"!="1"    &&  "${admin}"!="admin"    >
                    <div>
                        <button type="button" class="redbg white" style="border: 1px  solid  red;"
                                onclick="_crt_page.events.cexClick()">撤销
                        </button>
                    </div>
                </#if>
                <#if "${checkedit}"=="" &&  "${gxtype}"=="g"   &&   "${project.status}"=="006" &&   "${acceptview}"!="1" &&  "${zbshr}"!="1"    &&  "${admin}"!="admin"     >
                    <div>
                        <button type="button" style="background-color: red;border: 1px solid red;" class="bluebg white"
                                onclick="_crt_page.events.clickAccept()">应接项目
                        </button>
                    </div>
                </#if>
                <#if "${checkedit}"==""   &&  "${zbshr}"!="1"    &&  "${admin}"!="admin" >
                    <#if "${collect}"=="0">
                        <div>
                            <button type="button" class="bluebg white" onclick="_crt_page.events.clickCollect()">收藏</button>
                        </div>
                    <#elseif "${collect}"=="1">
                        <div>
                            <button type="button" class=" white" style=" border: 1px solid red;background-color: red;" onclick="_crt_page.events.cancelCollect()">取消收藏</button>
                        </div>
                    </#if>
                </#if>
                <#if "${checkedit}"==""   &&  "${zbshr}"!="1"  &&  "${admin}"!="admin" && "${zbStatus}"=="1"   && ( "${myself}"=="1"   || "${zbperson}"=="1")   >
                    <div>
                        <button type="button" class="bluebg white" onclick="_crt_page.events.goSupervisorInfo('${strprojecttype}')">项目进展</button>
                    </div>
                </#if>
                <#if "${checkedit}"=="" &&  "${gxtype}"=="g"  &&  "${acceptview}"=="1"  &&  "${project.status}"=="006"  &&  "${zbshr}"!="1"    &&  "${admin}"!="admin" >
                    <div>
                        <button type="button" class="bluebg white"  onclick="_crt_page.events.cxAccept()">撤销应接</button>
                    </div>
                </#if>

                <#if "${checkedit}"=="" &&  "${gxtype}"=="x"   &&  ( "${project.status}"=="006"  ||  "${project.status}"=="005" ||  "${project.status}"=="004") &&  "${myself}"=="1"  &&  "${zbshr}"!="1"    &&  "${admin}"!="admin"  >
                    <div>
                        <button type="button" class="bluebg white file-upload" filedata="{'type':'314','projectType':'002'}" >上传合同</button>
                    </div>
                </#if>
            </#if>
            <#if "${check}"=="1">
                <input type="hidden" id="caseId" value="${caseId}">
                <input type="hidden" id="taskId" value="${taskId}">
                <input type="hidden" id="taskName" value="${taskName}">
                <input type="hidden" id="businessId" value="${businessId}">
                <div class="checkbut">
                    <button type="button" style="border: 1px solid #5775EF;" class="bluebg white forbid"
                            onclick="_crt_page.events.checkPro(2)">通过
                    </button>
                </div>
                <div class="checkbut">
                    <button type="button" style="border: 1px solid red;" class="redbg white forbid"
                            onclick="_crt_page.events.checkPro(3)">驳回
                    </button>
                </div>
            </#if>
            <#if "${project.status}"=="006"  &&  "${zbshr}"=="1"  >
                <div>
                    <input    type="hidden"  id="tjperson"  value="${tjperson}"  >
                    <button type="button" class="bluebg white "  onclick="_crt_page.events.tjtongyi()"  >推荐同意</button>
                    <button type="button" class="bluebg white " style="    border: 1px solid red;background-color: red;" onclick="_crt_page.events.tjbutongyi()"  >推荐不同意</button>
                </div>
            </#if>
        </div>


    </div>
    <!--右侧内容-->
    <div class="Right fr 20" style="width:
    <#if  "${project.status}"=="002"  &&  "${check}"=="">

    <#else >
            84%
    </#if>
            ">

        <#if  '${bgcheck}'=='1'   &&    '${check}'=='1'  >
            <div class="contrast whitebg">
                <div class="clearfix">
                    变更内容
                </div>
                <table id="modrecord" lay-filter="modrecord"></table>
            </div>
        </#if>
        <div class="releaseStatus whitebg blue clearfix">
            <img src="${re.contextPath}/plugin/common/images/15@2x.png" alt="" class="fl"/>
            <#if "${project.status}"=="001">
                <span class="fl ml10">状态：已保存</span>
            <#elseif "${project.status}"=="002">
                <span class="fl ml10">状态：待审核</span>
            <#elseif "${project.status}"=="003">
                <span class="fl ml10">状态：已驳回</span>
            <#elseif "${project.status}"=="004">
                <span class="fl ml10">状态：已结束</span>
            <#elseif "${project.status}"=="005">
                <span class="fl ml10">状态：已撤销</span>
            <#elseif "${project.status}"=="006">
                <span class="fl ml10">状态：已发布</span>
            </#if>
            <div style="clear: both;">
                <#if "${project.checkStatus}"=='3'>
                    <span  style="color:red;">驳回原因:  ${project.checkRemark}</span>
                </#if>
            </div>

        </div>
        <div class="release releaseOne">
            <ul class="clearfix whitebg">
                <li class="clearfix">
                    <label class="fl"  style="width: 40%;">发布单位：</label>
                    <span class="fl">${comName}</span>
                    <input type="hidden" id="supProjectId" value="${project.supProjectId}">
                    <input type="hidden" id="projectName" value="${project.projectName}">
                    <input type="hidden" id="publishCompany"  name="publishCompany" value="${project.publishCompany}">
                </li>
                <li class="clearfix"  style="width: 20%;">
                    <label class="fl"  style="width: 40%;">发布人：</label>
                    <span class="fl">${project.publishByName}</span>
                </li>
                <#if "${gxtype}"=="x">
                    <li class="clearfix">
                        <label class="fl"  style="width: 40%;">联系电话：</label>
                        <span class="fl">${project.linkTel}</span>
                    </li>
                </#if>
                <li class="clearfix"  style="width: 30%;">
                    <label class="fl">发布日期：</label>
                    <span class="fl">${project.createDate}</span>
                </li>
            </ul>
            <ul class="clearfix whitebg mt20">
                <li class="clearfix">
                    <label class="fl">项目名称：</label>
                    <span class="fl">${project.projectName}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">项目类型：</label>
                    <span class="fl">${strprojecttype}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">项目建设总投资：</label>
                    <span class="fl">${project.tzMoney}</span>
                    <span class="fl ml10">元</span>
                </li>
                <li class="clearfix">
                    <label class="fl">合同金额：</label>
                    <span class="fl">${project.htMoney}</span>
                    <span class="fl ml10">元</span>
                </li>
                <#if  "${project.projectType}"?contains("001") >
                    <li class="clearfix">
                        <label class="fl">监理方式：</label>
                        <span class="fl">${supervisorWay}</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl">监理服务费：</label>
                        <span class="fl">${project.jlFwMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl">监理实施费用：</label>
                        <span class="fl">${project.jlSsMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                </#if>
                <#if  "${project.projectType}"?contains("002")>
                    <li class="clearfix">
                        <label class="fl">咨询服务费：</label>
                        <span class="fl">${project.zxFwMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl">咨询实施费用：</label>
                        <span class="fl">${project.zxSsMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                </#if>
                <#if "${project.projectType}"?contains("003")>
                    <li class="clearfix">
                        <label class="fl">检测服务费：</label>
                        <span class="fl">${project.jcFwMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl">检测实施费用：</label>
                        <span class="fl">${project.jcSsMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                </#if>
                <#if  "${project.projectType}"?contains("100")>
                    <li class="clearfix">
                        <label class="fl">其他服务费：</label>
                        <span class="fl">${project.qtFwMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl">其他实施费用：</label>
                        <span class="fl">${project.qtSsMoney}</span>
                        <span class="fl ml10">元</span>
                    </li>
                </#if>
                <li class="clearfix" style="width: 50%">
                    <label class="fl" style="width: 18%">无人应接：</label>
                    <span class="fl bor0" style="padding: 0px;width:6%">${project.days}</span>
                    <span class="fl ml10">天增加费用</span>
                </li>
                <li class="clearfix" >
                    <label class="fl" >公示天数：</label>
                    <span class="fl bor0" >${project.gsDays}</span>
                    <span class="fl ml10">天</span>
                </li>
                <#-- =========================================================================================-->
                <li class="clearfix" >
                    <label class="fl">合同编号：</label>
                    <span class="fl bor0" >${project.contractNo}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl" >内部合同编号：</label>
                    <span class="fl bor0" >${project.insideContractNo}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl" >采购/项目编号：</label>
                    <span class="fl bor0" >${project.payOrProjectNo}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl" >客户名称：</label>
                    <span class="fl bor0" >${project.owerCompany}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl" >客户联系人：</label>
                    <span class="fl bor0" >${project.projectLeader}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">联系人电话：</label>
                    <span class="fl">${project.khlxrPhone}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">联系人邮箱：</label>
                    <span class="fl">${project.khlxrEmail}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl">联系人职务：</label>
                    <span class="fl bor0" >${project.duty}</span>
                </li>
                <li class="clearfix">
                    <label class="fl" >中标信息查询网址：</label>
                    <span class="fl bor0">${project.queryWeb}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl">项目归属：</label>
                    <span class="fl bor0" >${project.projectOwnerName}</span>
                </li>
                <#-- =========================================================================================-->
                <li class="clearfix">
                    <label class="fl">项目范围：</label>
                    <span class="fl">${project.projectScope}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">项目预算：</label>
                    <span class="fl">${project.projectYs}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">付款条件：</label>
                    <span class="fl">${project.paymentClause}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">承诺(口头)：</label>
                    <span class="fl">${project.ktcn}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">人数沟通：</label>
                    <span class="fl">${project.rsgt}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">质保期长：</label>
                    <span class="fl">${project.zbq}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">预计进场时间：</label>
                    <span class="fl">${project.ydyjjcTime}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">引见时间：</label>
                    <span class="fl">${project.yjTime}</span>
                </li>
                <li class="clearfix" >
                    <label class="fl">工期：</label>
                    <span class="fl bor0" >${project.gqReq}</span>
                    <#--                    <span class="fl ml10">月</span>-->
                </li>
                <li class="clearfix">
                    <label class="fl">招标截止时间:</label>
                    <span class="fl">${project.zbEndDate}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">合同签订地点:</label>
                    <span class="fl">${project.htSignProvinceName}</span>
                    <span class="fl ml10">${project.htSignCityname}</span>
                    <span class="fl ml10">${project.htSignCountyName}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">行业类型:</label>
                    <span class="fl">${hyTypestr}</span>
                </li>
                <li class="clearfix" style="width: 50%;">
                    <label class="fl" class="fl" style="width: 28%;">实施地点:</label>
                    <div class="fl">
                        <#list listpalce as vo>
                            <div>${vo.provinceName} ${vo.cityName} ${vo.countyName}</div>
                        </#list>
                    </div>
                </li>
                <#if "${gxtype}"=="x">
                    <li class="clearfix" style="width: 50%;">
                        <label class="fl" class="fl" style="width: 28%;">是否对外公开:</label>
                        <#if "${project.isGk}"=="1">
                            <span class="fl">是</span>
                        <#else >
                            <span class="fl">否</span>
                        </#if>
                    </li>
                </#if>
                <#if "${project.status}"=="004"  &&  "${gxtype}"=="x">
                    <li class="clearfix" style="width: 50%;">
                        <label class="fl" class="fl" style="width: 28%;">中标单位:</label>
                        <span class="fl">${zbComName}</span>
                    </li>
                </#if>
                <li class="clearfix" style="width: 80%">
                    <label class="fl" style="width: 18%">其他需求：</label>
                    <span class="fl bor0" style="padding: 0px;width:80%">${project.otherXq}</span>
                </li>
                <li class="clearfix" style="width: 60%">
                    <label class="fl">是否需要招投标：</label>
                    <#if "${project.needZb}"=="1">
                        <span class="fl">是</span>
                    </#if>
                    <#if "${project.needZb}"=="0">
                        <span class="fl">否</span>
                    </#if>
                </li>
                <li class="clearfix" style="width: 60%">
                    <label class="fl">是否已招标：</label>
                    <#if "${project.isZb}"=="1">
                        <span class="fl">是</span>
                    </#if>
                    <#if "${project.isZb}"=="0">
                        <span class="fl">否</span>
                    </#if>
                </li>
                <li class="clearfix" style="width: 60%">
                    <label class="fl">是否已签合同：</label>
                    <#if "${project.qdHt}"=="1">
                        <span class="fl">是</span>
                    </#if>
                    <#if "${project.qdHt}"=="0">
                        <span class="fl">否</span>
                    </#if>
                </li>
                <li class="clearfix" style="width: 60%">
                    <label class="fl">是否有首付款：</label>
                    <#if "${project.isSfk}"=="1">
                        <span class="fl">是</span>
                    </#if>
                    <#if "${project.isSfk}"=="0">
                        <span class="fl">否</span>
                    </#if>
                </li>
                <li class="clearfix" style="width:60%;" >
                    <label class="fl " style="width: 22%;">合同签订时间：</label>
                    <span class="fl">${project.htSignDate}</span>
                </li>
                <li class="clearfix" style="width:60%;" >
                    <span  style=""><strong>主要负责人要求</strong></span>
                </li>
                <li class="clearfix">
                    <label class="fl">性别：</label>
                    <#if "${project.mainFzSex}"=="0">
                        <span class="fl">女</span>
                    <#elseif "${project.mainFzSex}"=="1" >
                        <span class="fl">男</span>
                    <#else >
                        <span class="fl">不限</span>
                    </#if>
                </li>
                <li class="clearfix">
                    <label class="fl">学历：</label>

                    <#if "${project.mainFzXl}"=="">
                        <span class="fl">不限</span>
                    <#else >
                        <#list edulist as vo>
                            <#if "${project.mainFzXl}"=="${vo.badtCode}">
                                <span class="fl">${vo.badtName}</span>
                            </#if>
                        </#list>
                    </#if>
                </li>
                <li class="clearfix" style="width: 60%;">
                    <label class="fl" style="width: 23%;">地区：</label>
                    <div class="fl">
                        <#list listperpalce as dto>
                            <div>${dto.provinceName} ${dto.cityName}</div>
                        </#list>
                    </div>
                </li>
                <li class="clearfix">
                    <label class="fl">擅长领域：</label>
                    <span class="fl">${strbest}</span>
                </li>
                <li class="clearfix">
                    <label class="fl">需要出差：</label>
                    <#if "${project.mainFzTrip}"=="0">
                        <span class="fl">否</span>
                    <#elseif "${project.mainFzTrip}"=="1" >
                        <span class="fl">是</span>
                    </#if>
                </li>
                <li class="clearfix" style="width: 80%">
                    <label class="fl" style="width: 18%">备注：</label>
                    <span class="fl bor0" style="padding: 0px;width: 80%">${project.mainFzRemark}</span>
                </li>
                <li class="clearfix" style="width: 80%"></li>
            </ul>
        </div>
        <div class="downModule whitebg " style="width: 90%;padding: 3%;border-radius: 0px;">
            <ul>
                <li>
                    <div class="clearfix">
                        <div class="downModuleTip clearfix fl">
                            <span class="fl ml10 mt10">相关文件</span>
                        </div>
                        <div class="downModuleBtn clearfix fr">
                            <button class="fl blue bgnone ml20" proId="${project.supProjectId}" onclick="_crt_file.events.allDown(this)" >全部下载</button>
                        </div>
                    </div>
                    <ul  class="uploadul" >
                        <#list filelist  as vo>
                            <div class="onep fl"></div>
                            <li class="clearfix">
                                <span class="fl ml10">
                                    <span id="${vo.id}" class="cursor" url="${vo.url}" onclick="_crt_file.events.viewFile(this)">${vo.fileName}</span>
                                </span>
                                <button class="fr blue bgnone bor0 mt25" id="${vo.id}" url="${vo.url}"
                                        onclick="_crt_file.events.export(this)">下载
                                </button>
                            </li>
                        </#list>
                    </ul>
                </li>
            </ul>
        </div>
        <!--综合对比-->
        <#if  '${acceptview}'=='1'>
            <div class="contrast whitebg">
                <#if  "${gxtype}"=="x" >
                    <div class="clearfix">
                        <button class="redbg white" onclick="_crt_page.events.comparison()">推荐依据</button>
                    </div>
                </#if>
                <#if  "${gxtype}"=="g" >
                    <div class="clearfix" style=" background: #F8F9FD;  padding: 0 30px;">
                        <div class="downModuleTip clearfix fl">
                            <span class="fl ml10 mt10">我的应接</span>
                        </div>
                    </div>
                </#if>

                <div class="project">
                    <table id="tableListAccept" class="layui-hide" lay-filter="tableListAccept"></table>
                </div>
            </div>

        </#if>

        <#--        <#if  '${bgcheck}'=='1'   &&    '${check}'=='1'  >-->
        <#--        <div class="contrast whitebg">-->
        <#--            <div class="clearfix">-->
        <#--            变更内容-->
        <#--            </div>-->
        <#--                <table id="modrecord" lay-filter="modrecord"></table>-->
        <#--        </div>-->
        <#--        </#if>-->

    </div>

    <!--应接项目-->

</div>
<!--JQ-->
<!--公用样式JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/form.file.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/layui/lay/extra/autocomplete.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/layui/dropdown_2.3.3/dropdown.js"></script>

<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/supplier/common/js/fileoper.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>

<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/lay/extra/"
    })
</script>

<script type="text/html" id="toolBar">
    <#if  "${gxtype}"=="g"  >
        <a
                <#if  "${project.status}"=="006"  &&   "${zbshr}"!="1"  &&   "${project.tjStatus}"!="1" >
                    class="layui-btn layui-btn-primary layui-btn-xs"
                <#else >
                    class="layui-btn layui-btn-primary layui-btn-xs  layui-btn-disabled"
                </#if>
                lay-event="addMoney"  style="margin-left: 0px;">填写最低实施费</a>
    </#if>
    <#if  "${zbshr}"=="1"  && "${project.status}"=="006">
        <a class="layui-btn layui-btn-primary layui-btn-xs pitchOn" lay-event="pitchOn" style="margin-left: 0px;">选择</a>
    </#if>
    <#if  "${gxtype}"=="x">

        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail" style="margin-left: 0px;">查看详情</a>
    </#if>
</script>

<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/dropdown_2.3.3/"
    })
</script>
<style type="text/css">
    .layui-table-cell {
        height: auto;
    }
</style>
<script type="text/javascript">
    $(document).bind('click', function(e) {
        var e = e || window.event; //浏览器兼容性
        var elem = e.target || e.srcElement;
        while (elem) { //循环判断至跟节点，防止点击的是div子元素
            if (elem.id && elem.id == 'more-btn-43f3f4e8276e43a491c9fa80272a0e1a') {
                return;
            }
            elem = elem.parentNode;
        }
        $('.layui-anim').css('display', 'none'); //点击的不是div或其子元素
    });

</script>
<script>

    var layer;
    var tableIns;
    var  bgcheck= '${bgcheck}';
    var check='${check}';
    if(bgcheck=="1"  &&  check=="1" ){
        $(function () {
            layui.use(['table'], function () {
                table = layui.table;
                //方法级渲染
                tableIns = table.render({
                    id: 'modrecord',
                    elem: '#modrecord',
                    url: '/supervisor/projectManager/gerRecordList?spId='+'${project.supProjectChangeId}',
                    page: true,
                    parseData: function(res){
                        if(res && res.length >= 0){
                            return {
                                "code": 0,
                                "msg": "加载成功",
                                "count": res.length,
                                "data":res
                            }
                        }
                    },
                    cols: [[
                        {title: '序号',width: '10%', align:'center', templet: function (res) {
                                return res.LAY_INDEX;
                            }},
                        /*        {title: '类型', field: 'spmrAction', width: '10%', sort: false},*/
                        {title: '修改内容', field: 'spFieldName', width: '30%',align:'center', sort: false},
                        {title: '变更前', field: 'oldValue', width: '30%', align:'center',sort: false},
                        {title: '变更后', field: 'newValue', width: '30%', align:'center',sort: false}
                    ]],
                });
            })
        })
    }


    function adddrop(a){
        setTimeout(function() {
            $(".layu-menu-item [lay-event='zdtj']").unbind('click').click(function (e) {
                zdtj();
            });
            $(".layu-menu-item [lay-event='zhtj']").unbind('click').click(function (e) {
                zhtj();
            });

        }, 500);

    }
    var msgs="${messages}";
    var layer, form, laydate, table, autocomplete, tableIns, element,dropdown;;
    var _crt_page;
    var zbStatus="${project.zbStatus}";
    var contract="${contract}";
    function zdtj(){
        var totalMoney="123";
        var jsondata={totalMoney:totalMoney,acceptOrder:''};
        table.reload('tableListAccept', {where: jsondata});
        setTimeout(function() {
            var  ht=$("#more-btn-111").html();
            if(ht!="最低价推荐"){
                $("#more-btn-111").html("最低价推荐");
            }
        }, 100);

    }
    function zhtj(){
        var acceptOrder="123";
        var jsondata={acceptOrder:acceptOrder,totalMoney:''};
        table.reload('tableListAccept', {where: jsondata});
        setTimeout(function() {
            var  ht=$("#more-btn-111").html();
            if(ht!="综合推荐"){
                $("#more-btn-111").html("综合推荐");
            }
        }, 100);
    }
    layui.use(['form', 'laydate', 'layer', 'autocomplete', 'table','element','dropdown'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;
        table = layui.table;
        element = layui.element;
        dropdown = layui.dropdown;

        var source = "${source}";
        var pftjhide = true;
        var fytitle = "实施费用";
        if (source == "w") {
            pftjhide = true;
            fytitle = "服务费用";
        } else {
            pftjhide = false;
            fytitle = "实施费用";
        }
        var supProjectId = "${project.supProjectId}";
        var publishType = "${project.publishType}";
        var projectType = "${project.projectType}";
        var zbshr = "${zbshr}";
        var  url='/supplier/projectManager/showAcceptProjectRecordList?supProjectId=' + supProjectId;
        if("1"==zbshr){
            url='/supplier/projectManager/showAcceptProjectRecordList?supProjectId=' + supProjectId+"&zbshr=1";
        }

        var gxtype = "${gxtype}";
        var shows=true;
        var cz='17.2%',zbwj='20%';
        if(gxtype=='x'){
            cz='12.2%';
            zbwj='14%';
            shows=false;
        }
        if(zbshr=='1'){
            cz='17.2%';
            zbwj='10%';
            shows=false;
        }
        if( gxtype=='g'){
            cz='17.2%';
            zbwj='20%';

        }
        //方法级渲染
        tableIns = table.render({
            id: 'tableListAccept',
            elem: '#tableListAccept',
            url: url,
            height: "auto",
            page: true,
            cols: [[
                {
                    title: '序号', width: '8%', templet: function (res) {
                        return res.LAY_INDEX;
                    }
                },
                {field: 'jlFwMoney', title: '监理服务费', width: '10%', hide: true, sort: true},
                {field: 'zxFwMoney', title: '咨询服务费', width: '10%', hide: true, sort: true},
                {field: 'jcFwMoney', title: '检测服务费', width: '10%', hide: true, sort: true},
                {field: 'qtFwMoney', title: '其他服务费', width: '10%', hide: true, sort: true},
                {field: 'jlSsMoney', title: '监理实施费', width: '10%', hide: true, sort: true},
                {field: 'zxSsMoney', title: '咨询实施费', width: '10%', hide: true, sort: true},
                {field: 'jcSsMoney', title: '检测实施费', width: '10%', hide: true, sort: true},
                {field: 'qtSsMoney', title: '其他实施费', width: '10%', hide: true, sort: true},
                {field: 'supAcceptId', title: 'supAcceptId', width: '10%', hide: true, sort: true},
                {
                    field: 'personName', title: '应接人', width: '10%', sort: true, templet: function (d) {
                        if(d.personName){
                            return d.personName;

                        }else{
                            return d.personNameLink;
                        }
                    }
                },
                {field: 'personNameLink', title: '应接人', width: '10%', hide: true, sort: true},
                {
                    field: 'companyName', title: '单位名称', width: '15%', sort: false, templet: function (d) {
                        return '<span   style="color: blue;"  onclick=" _crt_page.events.viewCompany(\'' + d.supAcceptId + '\')">' + d.companyName + '</span>';
                    }
                },
                {
                    field: 'acceptDate', title: '应接时间', width: '15%', sort: false
                },

                {
                    field: 'tbwj', title: '投标文件列表', width: zbwj, sort: false, templet: function (d) {
                        return '<span   style="color: blue;"  onclick=" _crt_page.events.viewFile(\'' + d.supAcceptId + '\')">查看文件</span>';
                    }
                },
                {
                    field: 'publishDate', title: fytitle, width: '16%', sort: false, templet: function (d) {
                        var str = "";
                        if (publishType == "001") {
                            if (projectType.indexOf("001") > -1) {
                                str = str + '<div>监理实施费' + d.jlSsMoney + "元</div>";
                            }
                            if (projectType.indexOf("002") > -1) {
                                str = str + '<div>咨询实施费' + d.zxSsMoney + "元</div>";
                            }
                            if (projectType.indexOf("003") > -1) {
                                str = str + '<div>检测实施费' + d.jcSsMoney + "元</div>";
                            }
                            if (projectType.indexOf("100") > -1) {
                                str = str + '其他实施费' + d.qtSsMoney + "元";
                            }
                            return str;
                        }
                        if (publishType == "002") {
                            if (projectType.indexOf("001") > -1) {
                                str = str + '<div>监理服务费' + d.jlFwMoney + "元</div>";
                            }
                            if (projectType.indexOf("002") > -1) {
                                str = str + '<div>咨询服务费' + d.zxFwMoney + "元</div>";
                            }
                            if (projectType.indexOf("003") > -1) {
                                str = str + '<div>检测服务费' + d.jcFwMoney + "元</div>";
                            }
                            if (projectType.indexOf("100") > -1) {
                                str = str + '<div>其他服务费' + d.qtFwMoney + "元";
                            }
                            return str;
                        }


                    }
                },
                {field: 'oper', title: '操作', width: cz, sort: false, toolbar: "#toolBar"},
                {field: 'acceptOrder', title: '最低价推荐',hide:shows,
                    width: '11%',templet:function(d){
                        var name="";
                        if(d.acceptOrder){
                            name='<img src="/plugin/common/images/78@2x.png"/>'+d.acceptOrder;
                        }
                        return name;
                    }
                }


            ]],
            done: function (res, currentCount) {
                //***重点***：table渲染完成后渲染element进度条

                $('td .laytable-cell-1-0-13').css({height:'100%'});
                $(".layui-table-page select").css("width", "80px");
                if(zbStatus=='1'){
                    $(".pitchOn").addClass("layui-btn-disabled").attr("disabled", false)
                }

                $("th[data-field=\"acceptOrder\"]  .layui-table-cell").html("<a id=\"more-btn-111\"  onclick='adddrop(this)' class=\"layui-btn layui-btn-primary layui-btn-xs more-btn ml0\" lay-filter=\"more-btn-222\"\n" +
                    "               lay-dropdown=\"{align:'center', menus: [{txt: '最低价推荐', event:'zdtj'},{txt: '综合推荐', event:'zhtj'}]}\">最低价推荐</a>");

                $("th[data-field=\"acceptOrder\"]  .layui-table-cell").css("padding","0px 10px 0px 10px");
                element.render();
                dropdown.suite();
            }
        });

        table.on('tool(tableListAccept)', function (obj) {
            var data = obj.data;
            var projectId = $("#supProjectId").val();
            if (obj.event === 'pitchOn') {
                // 查询有没有同意不同意
                layerAjaxGet('/supplier/projectManager/queryCheckRemark', {"supProjectId":projectId}, '', function (d) {
                    if (d.flag == true) {
                        layerAjax('/supplier/updatePitchOn',{projectId:projectId,acceptId:data.supAcceptId},'',function (d) {
                            if (d.flag == true) {
                                layer.msg(d.msg, {icon: 1});
                                window.location.reload();

                                // setTimeout(function (){
                                //     //打开文件列表
                                //     var title = "结果公示";
                                //     var url = "/supplier/gspubnotice/pushGsDetail?supProjectId=" + projectId;
                                //     var w = "500px";
                                //     var h = "380px";
                                //     layer.open({
                                //         id: 'form-add',
                                //         type: 2,
                                //         area: [w, h],
                                //         fix: false,
                                //         maxmin: true,
                                //         shadeClose: false,
                                //         shade: 0.4,
                                //         title: title,
                                //         content: url,
                                //         end: function () {
                                //             table.reload('tableList', {where: {}});
                                //             window.location.reload();
                                //         }
                                //     });
                                // },1000)
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        })
                    } else {
                        layer.msg(d.msg, {icon: 2});
                    }
                });
            }

            if (obj.event === 'addMoney') {
                var  yjstatus= "${project.yjStatus}";
                var  tjstatus= "${project.tjStatus}";
                if(tjstatus!="1"){
                    var  supAcceptId=obj.data.supAcceptId;
                    if( "${project.status}"=="006"  ){
                        var title="";
                        if(yjstatus=="1" ){
                            title = "议价";
                        }else{
                            title = "填写最低实施费用";
                        }
                        var url = "/supplier/yjDetail?supProjectId=" + projectId+"&supAcceptId="+supAcceptId;
                        var w = "500px";
                        var h = "80%";
                        layer.open({
                            id: 'form-add',
                            type: 2,
                            area: [w, h],
                            fix: false,
                            maxmin: true,
                            shadeClose: false,
                            shade: 0.4,
                            title: title,
                            content: url,
                            end: function () {
                                table.reload('tableList', {where: {}});
                                window.location.reload();
                            }
                        });
                    }
                }else{
                    layer.msg("已经存在推荐人，不允许修改", {icon: 2});
                }

            }
            if (obj.event === 'detail') {
                var supAcceptId = obj.data.supAcceptId;
                var title = "详情";
                var supProjectId = $("#supProjectId").val();
                var url = "/supplier/companyDetail?supAcceptId=" + supAcceptId;
                var w = "700px";
                var h = "90%";
                layer.open({
                    id: 'form-add',
                    type: 2,
                    area: [w, h],
                    fix: false,
                    maxmin: true,
                    shadeClose: false,
                    shade: 0.4,
                    title: title,
                    content: url,
                    end: function () {

                    }
                });

            }

        });


        $('.close').click(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        form.verify({
            maxlength: function (v, item) {
                var maxlength = item.getAttribute('lay-maxlength');
                if (v.trim() != '') {
                    if (v.trim().length > maxlength) {
                        return "输入长度不能大于" + maxlength + "个字符！";
                    }
                }
            },
            number: function (v) {
                var reg = /^[0-9]*$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的数字';
                }
            },
            decimal: function (v) {
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,10})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的金额';
                }
            },
            perdecimal: function (v) {
                var reg = /^[1-9][0-9]*([.][0-9]+)?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    if (v.trim() != "0" || v.trim() != 0) {
                        return '请输入数字';
                    }
                }
            }
        })
        _crt_page = {
            init: function () {
                //初始化事件
                _crt_page.events._init();
                //初始化Form
                form.on('submit(save)', _crt_page.forms.save);
            },
            forms: {
                save: function (data) {
                    var istg = _crt_page.events.saveBefore(data);
                    if (istg) {
                        layerAjax('/supplier//projectManager/addSave', data.field, '', function (d) {
                            if (d.flag == true) {
                                layer.msg(d.msg, {icon: 1});
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    }
                    return false;
                }

            },
            events: {
                _init: function () {
                    form.on('submit(save)', _crt_page.forms.create);
                    form.on('submit(submit)', _crt_page.forms.submit);
                    _crt_page.events.gqdateInit();
                    _crt_page.events.uploadInit();


                },
                tjtongyi: function () {
                    var  tjperson=$("#tjperson").val();
                    var id = $("#supProjectId").val();
                    layer.confirm('确定选择同意吗？', {
                        btn: ['确定', '取消'],

                    }, function (index) {
                        layerAjax('/supplier/projectManager/saveUpdateTjZb', {
                            "supProjectId": id,
                            "tjperson": tjperson,
                            "checkStatus":"2"
                        }, '', function (d) {
                            if (d.flag) {
                                layer.msg("操作成功！");
                                if(d.data=="1"){
                                    window.location.reload();
                                }
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });

                    }, function (index) {

                    });


                },
                tjbutongyi: function () {
                    var  tjperson=$("#tjperson").val();
                    var id = $("#supProjectId").val();
                    layer.confirm('确定选择不同意吗？', {
                        btn: ['确定', '取消'],

                    }, function (index) {

                        var type = "auto";
                        layer.open({
                            type: 1
                            ,
                            offset: type, //
                            area: ['600px', '300px'],
                            id: 'layerDemo' + type //防止重复弹出
                            ,
                            content: '<div style="align-content: center;"><div style="margin-top: 10px;margin-left: 60px;font-weight:bold;" class="b">原因</div><textarea id="remark"  name="remark" style="width: 450px;height: 100px;margin-left: 60px;margin-bottom: 10px;" placeholder="请填写不同意原因"></textarea></div>'
                            ,
                            btn: '关闭全部'
                            ,
                            btnAlign: 'c' //按钮居中
                            ,
                            shade: 0 //不显示遮罩
                            ,
                            btn: ['确定', '关闭'] //只是为了演示
                            ,
                            yes: function () {
                                var remark = $("#remark").val();
                                if (!remark) {
                                    layer.msg("请输入不同意原因", {icon: 2});
                                    return
                                } else {
                                    layerAjax('/supplier/projectManager/saveUpdateTjZb', {
                                        "supProjectId": id,
                                        "tjperson": tjperson,
                                        "checkStatus": "3",
                                        "remark":remark
                                    }, '', function (d) {
                                        if (d.flag) {
                                            layer.msg("操作成功！");
                                            setTimeout(tzym,2000);
                                        } else {
                                            layer.msg(d.msg, {icon: 2});
                                        }
                                    });
                                }

                            }
                            ,
                            btn2: function () {
                                layer.closeAll();
                            }
                        });
                        // layerAjax('/supplier/projectManager/saveUpdateTjZb', {
                        //     "supProjectId": id,
                        //     "tjperson": tjperson,
                        //     "checkStatus":"3"
                        // }, '', function (d) {
                        //     if (d.flag) {
                        //         layer.msg("操作成功！");
                        //     } else {
                        //         layer.msg(d.msg, {icon: 2});
                        //     }
                        // });

                    }, function (index) {

                    });

                },
                proEdit: function () {
                    var id = $("#supProjectId").val();
                    var projectName = $("#projectName").val();
                    var title = "编辑-"+ projectName;
                    if(contract=='s'){
                        var url = '/supplier/projectManager/projectDetail?type=m&supProjectId=' + id;
                        var w = "700px";
                        var h = "80%";
                        layer.open({
                            id: 'form-add',
                            type: 2,
                            area: [w, h],
                            fix: false,
                            maxmin: true,
                            shadeClose: false,
                            shade: 0.4,
                            title: title,
                            content: url,
                            end: function () {

                            }
                        });
                    }else{
                        window.parent._showtab('xm_e' + id, '编辑-' + projectName, '/supplier/projectManager/projectDetail?type=m&supProjectId=' + id);
                    }
                },
                viewFile: function (data) {
                    //打开文件列表
                    var title = "投标文件";
                    var supProjectId = $("#supProjectId").val();
                    var url = "/supplier/tbFileDetail?supAcceptId=" + data;
                    var w = "700px";
                    var h = "80%";
                    layer.open({
                        id: 'form-add',
                        type: 2,
                        area: [w, h],
                        fix: false,
                        maxmin: true,
                        shadeClose: false,
                        shade: 0.4,
                        title: title,
                        content: url,
                        end: function () {

                        }
                    });

                },
                viewCompany: function (data) {
                    //打开文件列表
                    var title = "详情";
                    var supProjectId = $("#supProjectId").val();
                    var url = "/supplier/companyDetail?supAcceptId=" + data;
                    var w = "700px";
                    var h = "90%";
                    layer.open({
                        id: 'form-add',
                        type: 2,
                        area: [w, h],
                        fix: false,
                        maxmin: true,
                        shadeClose: false,
                        shade: 0.4,
                        title: title,
                        content: url,
                        end: function () {

                        }
                    });


                },
                publicity: function () {
                    var id = $("#supProjectId").val();
                    //打开文件列表
                    layerAjaxGet("/supplier/gspubnotice/publicity?supProjectId=" + id,'','',function (d) {
                        if(d.flag){
                            var title = "结果公示";
                            var url = "/supplier/gspubnotice/viewPushGsDetail?supProjectId=" + id;
                            var w = "500px";
                            var h = "80%";
                            layer.open({
                                id: 'form-add',
                                type: 2,
                                area: [w, h],
                                fix: false,
                                maxmin: true,
                                shadeClose: false,
                                shade: 0.4,
                                title: title,
                                content: url,
                                end: function () {
                                    table.reload('tableList', {where: {}});
                                    window.location.reload();
                                }
                            });
                        }else{
                            layer.msg(d.msg, {icon: 2});
                        }
                    })

                },
                cexClick: function () {
                    var id = $("#supProjectId").val();
                    layer.confirm('撤销后供方将无法查看应接该项目，确定要撤销吗？', {
                        btn: ['确定', '取消'],

                    }, function (index) {
                        layerAjax('/supplier/projectManager/updateStatus', {
                            "supProjectId": id,
                            "status": "005"
                        }, '', function (d) {
                            if (d.flag) {
                                layer.msg("操作成功", {icon: 1});
                                setTimeout(_crt_page.events.reloadPro,2000)
                                // 重新刷新页面
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });

                    }, function (index) {

                    });
                },
                viewChangeClick: function () {
                    var id = $("#supProjectId").val();
                    layerAjaxGet('/supplier/projectManager/queryChangeCount', {
                        "supProjectId": id
                    }, '', function (d) {
                        if (d.flag) {
                            var type = "auto";
                            var w = "100%";
                            var h = "100%";
                            var url="/supplier/projectManager/viewChangeDetail?supProjectId="+id;
                            layer.open({
                                id: 'form-add',
                                type: 2,
                                area: [w, h],
                                fix: false,
                                maxmin: true,
                                shadeClose: false,
                                shade: 0.4,
                                title: "变更公告",
                                content: url,
                                end: function () {

                                }
                            });
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                clickCollect:function(){//收藏
                    var id = $("#supProjectId").val();
                    layerAjax('/supplier/ruleCentre/insertCollect', {
                        "id": id
                    }, '', function (d) {
                        if (d.flag) {
                            layer.open({
                                content:d.msg,
                                yes:function(index,layero){
                                    window.location.reload();
                                },
                                cancel: function(){
                                    window.location.reload();
                                }
                            })
                            // layer.msg(d.msg, {icon: 1});
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });
                },
                cancelCollect:function(){//取消收藏
                    var id = $("#supProjectId").val();
                    layer.confirm('确定要取消收藏吗？', {
                        btn: ['确定','关闭'] //按钮
                    }, function(){
                        layerAjax('/supplier/ruleCentre/deleteCollect',{projectId:id},'',function (d) {
                            if(d.flag){
                                layer.msg(d.msg, {icon: 1});
                                setTimeout(function (){
                                    window.location.reload();
                                },1000)
                            }else{
                                layer.msg(d.msg, {icon: 2});
                                setTimeout(function (){
                                    window.location.reload();
                                },1000)
                            }
                        })
                    });
                },
                goSupervisorInfo: function(type){
                    // 判断是什么类型 监理，咨询，检测，其他，或者多个
                    if ($.trim(type).length > 2){ // 多个类型组合
                        this.projectProgressMoreType(type);
                    }else {// 单类型
                        this.AccordingTypeOpenPage(type);
                    }
                },
                // 处理项目进展为多个类型的时候
                projectProgressMoreType:function (type){
                    var that=this;
                    // 分割字符串
                    var m = type.split(",");
                    var strContent = "";
                    for (var i = 0; i < m.length;i++){
                        var s = "<div style='margin-right: 20px'><input type='radio'  style='height: max-content' name='mold' value="+m[i]+" title="+m[i]+">"+m[i]+"</div>";
                        strContent += s;
                    }
                    layer.open({
                        title: '选择类型',
                        type: 1,
                        shadeClose: false,
                        area: ['300px','200px'],
                        // content:strContent,
                        content:'<div style="text-align: center;padding-top: 30px;display: flex;justify-content:center;">'+strContent+'</div>',
                        btn: ['确定','关闭'],
                        yes: function (index){
                            //当点击‘确定’按钮的时候，获取弹出层返回的值
                            var tempType = $("input[type='radio']:checked").val();
                            //打印返回的值，看是否有我们想返回的值。
                            // console.log(tempType);
                            layer.closeAll();
                            that.AccordingTypeOpenPage(tempType);
                        },
                        btn2: function () {
                            layer.closeAll();
                        }
                    })
                },
                // 根据具体类型打开具体页面
                AccordingTypeOpenPage: function (accordingType){
                    if ("监理" == accordingType){
                        this.jlPage();
                    }else if ("咨询" == accordingType){
                        this.zxPage();
                    }else if ("检测" == accordingType){
                        this.jcPage();
                    }else if ("其他" == accordingType){
                        layer.msg("您选择了其他");
                    }else if (undefined == accordingType){
                        layer.msg("请选择类型");
                    }
                },
                // 项目进展打开监理页面
                jlPage: function (){
                    //跳转到监理系统的项目查看页面
                    var id = $("#supProjectId").val();
                    //首先判断监理项目有没有与该项目对应的项目
                    layerAjax('/supplier/projectManager/getSupplierProject', {
                        "supProjectId": id
                    }, '', function (d) {
                        if (d.flag) {
                            var supervisorProject = d.data;
                            if(supervisorProject){
                                //跳转到监理系统项目详情页:
                                localStorage.setItem('turntopageprjid', supervisorProject.id);
                                localStorage.setItem('turntopageprjname', supervisorProject.name);
                                // parent.window.open('/supervisor/projectManager/index',"scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
                                parent.window.open('/supervisor/projectManager/index');
                                return;
                            }else{
                                layer.msg("没有查询到项目进度", {icon: 2});
                            }
                        } else {
                            layer.msg("没有查询到项目进度", {icon: 2});
                        }
                    });
                },
                // 项目进展打开咨询页面
                zxPage: function (){
                    // 跳转到咨询系统的项目查看页面 获取供需项目的id
                    var id = $("#supProjectId").val();
                    //首先判断咨询项目有没有与该项目对应的项目
                    layerAjax('/supplier/projectManager/getZxProject', {
                        "supProjectId": id
                    }, '', function (d) {
                        if (d.flag) {
                            var supervisorProject = d.data;
                            if(supervisorProject){
                                //跳转到监理系统项目详情页:
                                localStorage.setItem('turntopageprjid', supervisorProject.id);
                                localStorage.setItem('turntopageprjname', supervisorProject.name);
                                // parent.window.open('/supervisor/projectManager/index',"scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
                                parent.window.open('/zx/projectManager/index');
                                return;
                            }else{
                                layer.msg("没有查询到项目进度", {icon: 2});
                            }
                        } else {
                            layer.msg("没有查询到项目进度", {icon: 2});
                        }
                    });
                },
                // 项目进展打开检测页面
                jcPage: function (){
                    // 跳转到咨询系统的项目查看页面 获取供需项目的id
                    var id = $("#supProjectId").val();
                    //首先判断咨询项目有没有与该项目对应的项目
                    layerAjax('/supplier/projectManager/getJcProject', {
                        "supProjectId": id
                    }, '', function (d) {
                        if (d.flag) {
                            var supervisorProject = d.data;
                            if(supervisorProject){
                                //跳转到监理系统项目详情页:
                                localStorage.setItem('turntopageprjid', supervisorProject.id);
                                localStorage.setItem('turntopageprjname', supervisorProject.name);
                                // parent.window.open('/supervisor/projectManager/index',"scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
                                parent.window.open('/jc/projectManager/index');
                                return;
                            }else{
                                layer.msg("没有查询到项目进度", {icon: 2});
                            }
                        } else {
                            layer.msg("没有查询到项目进度", {icon: 2});
                        }
                    });
                },
                cxAccept:function(){
                    // 撤销应接
                    var id = $("#supProjectId").val();
                    layer.confirm('确定撤销应接吗？', {
                        btn: ['确定', '取消'],

                    }, function (index) {
                        layerAjax('/supplier/projectManager/updateCxAccept', {
                            "supProjectId": id
                        }, '', function (d) {
                            if (d.flag) {
                                layer.msg("操作成功！");
                                window.location.reload();
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });

                    }, function (index) {

                    });

                },
                clickAccept: function () {
                    if(msgs){
                        layer.msg(msgs, {icon: 2});return false;
                    }else{
                        var message = $("#message").val();
                        if (message) {
                            //自行注册供方人员或组织需要完善信息才可以应接项目，未完善信息则进入该页面。
                            var type = "auto";
                            layer.open({
                                type: 1
                                ,
                                offset: type, //
                                title: '无法应接项目',
                                area: ['400px', '200px'],
                                id: 'layerDemo' + type //防止重复弹出
                                ,
                                content: '<div style="align-content: center;"><div style="margin-top: 10px;margin-left: 30px;margin-right: 30px;" class="b">' + message + '</div></div>'
                                ,
                                btn: '关闭全部'
                                ,
                                btnAlign: 'c' //按钮居中
                                ,
                                shade: 0 //不显示遮罩
                                ,
                                btn: ['去完善', '关闭'] //只是为了演示
                                ,
                                yes: function () {
                                    localStorage.setItem("todoinfo", "tt")
                                    parent.window.open('/main');
                                }
                                ,
                                btn2: function () {
                                    layer.closeAll();
                                }
                            });

                        } else {
                            var title = "应接项目";
                            var supProjectId = $("#supProjectId").val();
                            var url = "/supplier/projectManager/acceptProjectDetail?supProjectId=" + supProjectId;
                            var w = "60%";
                            var h = "100%";
                            layer.open({
                                id: 'form-add',
                                type: 2,
                                area: [w, h],
                                fix: false,
                                maxmin: true,
                                shadeClose: false,
                                shade: 0.4,
                                title: title,
                                content: url,
                                end: function () {
                                    window.location.reload();
                                }
                            });
                        }
                    }

                },
                checkPro: function (checkStatus) {
                    if (checkStatus == "3") {
                        var type = "auto";
                        //填写驳回原因
                        layer.open({
                            type: 1
                            ,
                            offset: type, //
                            area: ['600px', '300px'],
                            id: 'layerDemo' + type //防止重复弹出
                            ,
                            content: '<div style="align-content: center;"><div style="margin-top: 10px;margin-left: 60px;font-weight:bold;" class="b">驳回原因</div><textarea id="remark"  name="remark" style="width: 450px;height: 100px;margin-left: 60px;margin-bottom: 10px;" placeholder="请填写驳回原因"></textarea></div>'
                            ,
                            btn: '关闭全部'
                            ,
                            btnAlign: 'c' //按钮居中
                            ,
                            shade: 0 //不显示遮罩
                            ,
                            btn: ['确定', '关闭'] //只是为了演示
                            ,
                            yes: function () {
                                var remark = $("#remark").val();
                                if (!remark) {
                                    layer.msg("请输入驳回原因", {icon: 2});
                                    return;
                                } else {
                                    _crt_page.events.doCheck(remark, checkStatus)
                                }

                            }
                            ,
                            btn2: function () {
                                layer.closeAll();
                            }
                        });
                        /*     layer.open({
                                 type: 2,
                                 area: ['400px', '200px'],
                                 fix: false,
                                 shadeClose: false,
                                 shade: 0.4,
                                 title: "驳回原因",
                                 content: '/supplier/rejectCause?caseId='+$("#caseId").val()+"&taskId="+$("#taskId").val()+"&taskName="+$("#taskName").val()+"&businessId="+$("#businessId").val(),

                                 yes: function(){
                                     alert(8888);
                                 },
                                 btn2: function(){
                                     layer.closeAll();
                                 },

                                 zIndex: layer.zIndex, //重点1,
                                 success: function(layero){
                                     layer.setTop(layero); //重点2
                                 }
                             });*/
                    } else {
                        layer.confirm('确定审核通过吗？', {
                            btn: ['确定', '取消'],

                        }, function (index) {
                            _crt_page.events.doCheck("", checkStatus)
                        }, function (index) {
                            $(".checkbut").find('[type=button]').removeClass("layui-btn-disabled").attr("disabled", false);
                        });
                    }


                },
                doCheck: function (remark, checkStatus) {
                    $(".checkbut").find('[type=button]').addClass("layui-btn-disabled").attr("disabled", true);
                    // caseId
                    var caseId = $("#caseId").val();
                    // 任务id
                    var taskId = $("#taskId").val();

                    var taskName = $("#taskName").val();
                    // 业务表id
                    var businessId = $("#businessId").val();

                    var jsonc = {
                        caseId: caseId,
                        taskId: taskId,
                        businessId: businessId,
                        remark: remark,
                        checkStatus: checkStatus,
                        taskName: taskName
                    }
                    var url = "/supervisor/lcManager/updateCheckGxCheck";
                    layerAjax(url, jsonc, '', function (d) {
                        if (d.flag == true) {
                            if (checkStatus == "2") {
                                //$(".releaseStatus").find("span").html("状态：已发布");
                            } else {
                                //$(".releaseStatus").find("span").html("状态：已驳回");
                            }

                            // 恢复按钮可用
                            layer.msg(d.msg);
                            //20210906 修改 增加 刷新页面
                            setTimeout(tzym,1000);
                        } else {
                            // 恢复按钮可用
                            $(".checkbut").find('[type=button]').removeClass("layui-btn-disabled").attr("disabled", false);
                            layer.msg(d.msg, {icon: 2});
                        }
                    });
                },
                proDelete: function () {
                    var supProjectId = $("#supProjectId").val();
                    layer.confirm('确定删除吗？', function (index) {
                        layerAjax('/supplier/projectManager/deletePro', {"supProjectId": supProjectId}, '', function (d) {
                            if (d.flag) {
                                layer.msg("删除成功！");
                                setTimeout(function (){
                                    window.parent._delTab("xm_v" + supProjectId);
                                }, 500);

                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    });

                },
                gqdateInit: function () {
                    // 工期开始时间
                    laydate.render({
                        elem: '#gqBeginDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var endDate = $("#gqEndDate").val();
                            if (endDate && endDate < value) {
                                layer.msg("开始时间不能大于结束时间", {icon: 2});
                                $(that).val("");
                                return;
                            }
                        }
                    });
                    // 工期截止时间
                    laydate.render({
                        elem: '#gqEndDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var startDate = $("#gqBeginDate").val();
                            if (startDate && startDate > value) {
                                layer.msg("结束时间不能小于开始时间", {icon: 2});
                                $(that).val("");
                                return;
                            }
                        }
                    });
                    // 招标截止时间
                    laydate.render({
                        elem: '#zbEndDate',
                        trigger: 'click',
                        type: 'datetime',
                        format: 'yyyy年MM月dd日HH点mm分'

                    });
                    // 合同签订时间
                    laydate.render({
                        elem: '#htSignDate',
                        trigger: 'click',
                        type: 'datetime',
                        format: 'yyyy年MM月dd日HH点mm分'
                    });

                },
                uploadInit:function(){
                    $(".upfinish").addClass("layui-btn-disabled").attr("disabled",true);
                    var tempFileIds = [];
                    $.each($('.file-upload'),function(i,e){
                        //绑定一个个上传文件:
                        var fileDataStr = $(e).attr('filedata');
                        //至少fileData中需要有文件的类型编码
                        var fileData = eval('(' + fileDataStr + ')');
                        fileData.linkId='${project.supProjectId}';
                        console.log(fileData);
                        var fileContainer = $(".uploadul");
                        var type = fileData.type;
                        var ext = '';
                        // if(type == '311'){
                        //     //书著文件,只能上传文档
                        //     ext = 'doc|docx';
                        // }else if(type == '312'){
                        //     //扫描件,只能上传pdf
                        //     ext = 'doc|docx';
                        // }else if(type == '313'){
                        //     ext = 'doc|docx';
                        // }else if(type == '314'){
                        //     ext = 'doc|docx';
                        // }else if(type == '315'){
                        //     ext = 'doc|docx';
                        // }
                        //上传组件参数自定义:
                        var uploadPara = {
                            elem: $(e),
                            accept: 'file',
                            temp: "1",
                            exts: ext,
                            before: function(res){
                                this.data = fileData;
                            },
                            done:function(res){
                                if(res.flag){
                                    var newFileId = res.data.id;
                                    var type =res.data.type+'';
                                    var newIndex = $('.form-file-div').length*1;
                                    layer.msg("上传成功",{icon:1});
                                    $(fileContainer).append("    <li class=\"clearfix form-file-div form-file-div-"+type+"\">" +
                                        "                            <input type=\"checkbox\" class=\"fl\"  style=\"display: inline-block;\" lay-ignore>\n" +
                                        "                            <span class=\"fl ml10\">"+res.data.fileName+"</span>\n" +
                                        '                            <input type="hidden" class="'+type+'-input" name="tempFormFileIds['+newIndex+']" value="'+newFileId+'" />'+
                                        "                        </li>");
                                    // 弹框
                                    _crt_page.events.openHt(newFileId);
                                }else{
                                    if(res.msg){
                                        layer.msg(res.msg,{icon:2})
                                    }else{
                                        layer.msg("上传失败",{icon:2})
                                    }
                                }
                            },
                            container: fileContainer
                            // fileOrder: 'desc'
                        };
                        _form_file.upload.bind(uploadPara);
                    })
                },
                openHt:function(newFileId){
                    var title = "上传合同";
                    var supProjectId = $("#supProjectId").val();
                    var url = "/supplier/projectManager/updateht?supProjectId=" + supProjectId+"&fileId="+newFileId;
                    var w = "600px";
                    var h = "500px";
                    layer.open({
                        id: 'form-add',
                        type: 2,
                        area: [w, h],
                        fix: false,
                        maxmin: true,
                        shadeClose: false,
                        shade: 0.4,
                        title: title,
                        content: url,
                        end: function(index,layero ){
                            location.reload();
                        }
                    });

                },
                saveBefore: function (data) {
                    var isTg = true;
                    var lxlength = $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    if (lxlength == 0) {
                        layer.msg("请选择项目类型", {icon: 2});
                        isTg = false;
                        return isTg;
                    }
                    var lxsz = [];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i, v) {
                        var lxvalue = $(v).attr("value");
                        lxsz.push(lxvalue);
                    });

                    lxsz = lxsz.join(',');
                    data.field.projectType = lxsz;
                    var dobest = [];
                    $(".doBestInput:checked").each(function (i, v) {
                        var value = $(v).attr("value");
                        dobest.push(value);
                    });
                    dobest = dobest.join(',');
                    data.field.mainFzField = dobest;
                    return isTg;


                },
                ssfybulur: function (object) {
                    var ssfy = $(object).val();
                    var ssblper = '${ssblper}';
                    if (ssfy) {
                        var fwfy = (ssfy * ssblper).toFixed(2);
                        $(object).parent().next().find("input").val(fwfy);
                    }

                },
                xmlxChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked")) {
                        $(".lx" + lxvalue).attr("style", "display:block;")
                        $(".lx" + lxvalue).find("input").attr("lay-verify", "required|decimal|maxlength")
                    } else {
                        $(".lx" + lxvalue).attr("style", "display:none;")
                        $(".lx" + lxvalue).find("input").removeAttr("lay-verify");
                        $(".lx" + lxvalue).find("input").val("");
                    }
                    var lxlength = $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    var lxsz = [];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i, v) {
                        var lxvalue = $(v).attr("value");
                        lxsz.push(lxvalue);
                    });
                    lxsz = lxsz.join(',');

                },
                needZtbChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".LIisZb").css({"display": "block", "width": "60%"});
                    } else {
                        $(".LIisZb").attr("style", "display:none;")
                        $(".LIisZb").find("input").prop('checked', false);
                        $(".LIqdHt").attr("style", "display:none;")
                        $(".LIqdHt").find("input").prop('checked', false);
                        $(".sfk").attr("style", "display:none;")
                        $(".sfk").find("input").prop('checked', false);
                        $(".htqdhj").attr("style", "display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                },
                isZbChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".LIqdHt").css({"display": "block", "width": "60%"});
                    } else {
                        $(".LIqdHt").attr("style", "display:none;")
                        $(".LIqdHt").find("input").prop('checked', false);
                        $(".sfk").attr("style", "display:none;")
                        $(".sfk").find("input").prop('checked', false);
                        $(".htqdhj").attr("style", "display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                },
                qdHtChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".sfk").css({"display": "block", "width": "60%"});
                        $(".htqdhj").css({"display": "block", "width": "60%"});
                        $(".htqdhj").find("input").attr("lay-verify", "required")
                    } else {
                        $(".sfk").attr("style", "display:none;")
                        $(".sfk").find("input").prop('checked', false);
                        $(".htqdhj").attr("style", "display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                },
                provinceChange: function (object) {
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择市</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                cityChange: function (object) {
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择区县</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                personPlaceProvinceInit: function () {
                    $(".mainpersonplace").find("div").each(function (i, v) {
                        var provinceId = $(v).find("select:first").attr("id");
                        var cityId = $(v).find("select:eq(1)").attr("id");
                        $("#" + provinceId).change(function () {
                            var code = $('#' + provinceId + ' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#" + cityId).empty().append("<option value=''>选择市</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#" + cityId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });
                },
                placeCityInit: function () {
                    $(".ssplace").find("div").each(function (i, v) {
                        var cityId = $(v).find("select:eq(1)").attr("id");
                        var countyId = $(v).find("select:eq(2)").attr("id");
                        $("#" + cityId).change(function () {
                            var code = $('#' + cityId + ' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#" + countyId).empty().append("<option value=''>选择区县</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#" + countyId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });

                },
                resetPlace: function () {
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".ssplace").find(".divplaceselect").each(function (i, v) {
                        $(v).find("select:eq(0)").attr("name", "projectPlacedtos[" + i + "].province")
                        $(v).find("select:eq(1)").attr("name", "projectPlacedtos[" + i + "].city");
                        $(v).find("select:eq(2)").attr("name", "projectPlacedtos[" + i + "].county");
                        $(v).find("select:eq(0)").attr("lay-filter", "projectPlacedtos[" + i + "].province");
                        $(v).find("select:eq(1)").attr("lay-filter", "projectPlacedtos[" + i + "].city");
                        $(v).find("select:eq(2)").attr("lay-filter", "projectPlacedtos[" + i + "].county");
                    });
                },
                resetPersonPlace: function () {
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".mainpersonplace").find(".divpersonplaceselect").each(function (i, v) {
                        $(v).find("select:eq(0)").attr("name", "personPlacedtos[" + i + "].province")
                        $(v).find("select:eq(0)").attr("lay-filter", "personPlacedtos[" + i + "].province");
                        $(v).find("select:eq(1)").attr("name", "personPlacedtos[" + i + "].city");
                        $(v).find("select:eq(1)").attr("lay-filter", "personPlacedtos[" + i + "].city");

                    });
                },
                deletePlace: function (object) {
                    var placeLength = $(".ssplace").find(".divplaceselect").length;
                    if (placeLength == 1) {
                        layer.msg("实施地点不能全部删除", {icon: 2});
                    } else {
                        $(object).parent().remove();
                        _crt_page.events.resetPlace();
                    }

                },
                addPlace: function (object) {
                    $(object).parent().after(" <div class=\"clearfix mt10 divplaceselect\">\n" +
                        "                            <select name=\"projectPlacedtos[1].province\" class=\"ml8 fl\" id=\"placeprovince1\"   onchange=\"_crt_page.events.provinceChange(this)\"  style=\"width:90px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].city\" id=\"placecity1\" class=\"ml8 fl\"  onchange=\"_crt_page.events.cityChange(this)\" lay-filter=\"projectPlacedtos[1].city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].county\" id=\"placecounty1\" class=\"ml8 fl\" lay-filter=\"projectPlacedtos[1].county\" lay-verify=\"required\"\n" +
                        "                                    style=\"width:90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20 addplaceimage\" onclick=\"_crt_page.events.addPlace(this)\" >\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePlace(this)\">\n" +
                        "                        </div>");
                    _crt_page.events.resetPlace();

                },
                addPersonPlace: function (object) {
                    $(object).parent().after("\n" +
                        "                        <div class=\"clearfix mt10 divpersonplaceselect\">\n" +
                        "                            <select name=\"personPlacedtos[0].province\" class=\"ml8 fl\"   onchange=\"_crt_page.events.provinceChange(this)\" id=\"personplaceprovince0\" style=\"width:200px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"personPlacedtos[0].city\" id=\"personplacecity0\" class=\"ml8 fl\" lay-filter=\"city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 200px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.addPersonPlace(this)\">\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePersonPlace(this)\">\n" +
                        "                        ");
                    _crt_page.events.resetPersonPlace();
                },
                deletePersonPlace: function (object) {
                    var placeLength = $(".mainpersonplace").find(".divpersonplaceselect").length;
                    if (placeLength == 1) {
                        layer.msg("实施地点不能全部删除", {icon: 2});
                    } else {
                        $(object).parent().remove();
                        _crt_page.events.resetPersonPlace();
                    }

                },
                reloadPro:function(){
                    window.location.reload();
                },
                comparison: function () {//综合对比
                    var supProjectId = $("#supProjectId").val();
                    var fromnotice=  "${fromnotice}";
                    //自行注册供方人员或组织需要完善信息才可以应接项目，未完善信息则进入该页面。
                    var type = "auto";
                    var title = "应接人推荐依据";
                    layerAjax("/recommend/time",{id:supProjectId},'',function (b) {
                        if(b.flag){
                            var supProjectId = $("#supProjectId").val();
                            if("1"==fromnotice){
                                var url = "/recommend/comparison?supProjectId=" + supProjectId;
                                layer.open({
                                    id: 'form-add',
                                    type: 2,
                                    area: [$(window).width()+"px", $(window).height()+"px"],
                                    fix: false,
                                    maxmin: true,
                                    shadeClose: false,
                                    shade: 0.4,
                                    title: "推荐依据",
                                    content: url,
                                    end: function(index,layero ){
                                        location.reload();
                                    }
                                });
                            }else{
                                window.parent._showtab('cf8c85d3685a48abb23a4104ef25483c', '应接人推荐依据', "/recommend/comparison?supProjectId=" + supProjectId);
                            }




                        }else{
                            layer.msg("未到招标截止日期不能综合对比", {icon: 2});
                        }
                    })

                }

            }
        };
        _crt_page.init();
    });
    function tzym(){
        layer.closeAll();
        window.location.reload();
    }

</script>
</body>

</html>
